#pragma config(Hubs,  S1, HTMotor,  none,     none,     none)
#pragma config(Sensor, S1,     ,               sensorI2CMuxController)
#pragma config(Motor,  motorA,           ,             tmotorNXT, openLoop, encoder)
#pragma config(Motor,  motorB,           ,             tmotorNXT, openLoop, encoder)
#pragma config(Motor,  motorC,           ,             tmotorNXT, openLoop, encoder)
#pragma config(Motor,  mtr_S1_C1_1,     left,          tmotorTetrix, openLoop)
#pragma config(Motor,  mtr_S1_C1_2,     right,         tmotorTetrix, openLoop)
//*!!Code automatically generated by 'ROBOTC' configuration wizard               !!*//

#pragma debuggerWindows("nxtLCDScreen");
//#pragma debuggerWindows("Servos");
#pragma debuggerWindows("joystickSimple");

#include "motors.c"
#include "controllers.c"
#include "JoystickDriver.c"
#include "struct.c"
#include "enum.c"


task main()
{
	InitColorsStruct();

	while(true)
	{
		getJoystickSettings(joystick);

		if(abs(joystick.joy1_y1) > DEAD_ZONE)
		{
			DriveLeftMotor(joystick.joy1_y1);
		}
		else
		{
			DriveLeftMotor(0);
		}
		if(abs(joystick.joy1_y2) >DEAD_ZONE)
		{
			DriveRightMotor(joystick.joy1_y2);
		}
		else
		{
			DriveRightMotor(0);
		}
	}
}
